﻿using Fee.Orders;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Fee.Mapping.Orders.BudgetOrders
{
    public class BudgetOrderPlanCostMapping : IEntityTypeConfiguration<BudgetOrderPlanCost>
    {
        public void Configure(EntityTypeBuilder<BudgetOrderPlanCost> build)
        {
            build.HasKey(_ => _.Id);
            build.Property(_ => _.Id).ValueGeneratedOnAdd();
            build.Property(_ => _.Type);

            build.Property(f => f.Construction);
            build.Property(f => f.Design);
            build.Property(f => f.Supervisor);
            build.Property(f => f.FirstPartyMeteria);
            build.Property(f => f.TotalAmount);

            build.Property(f => f.DesignEffect);
            build.Property(f => f.SupervisorEffect);
            build.Property(f => f.ConstructionEffect);

            build.ToTable("fee_BudgetOrderPlanCost");
        }
    }
}